사이트 내 전체검색
리눅스 최근 수정된 파일을 찾을때 find 명령 옵션
로빈아빠
https://cmd.kr/server/922 URL이 복사되었습니다.

본문

리눅스 내에 최근 수정된 파일을 찾을때 find 명령에 다음과 같은 옵션을 이용하시면 됩니다.
주로 서버에 해킹을 당했는데 몇일간 관리자가 수정한일이 없었다면 이와 같이 검색해서 수정된 파일들 위주로 역추적해서 찾을 수도 있습니다.

find / -ctime -5 -type f 


-ctime
Many times this is understood as a creation time but that wrong. Ctime is change time
of file stats such as ownership, what permissions it has etc. 
파일의 정보가 변경된 시간 chmod, chown과 연관성이 있습니다.

-mtime
File modification time. Value of mtime is updated when content of file changes. 
파일의 내용이 변경된 시간 ls -l 에서 나오는 시간

-atime
File access time. Value of atime is modified when file is opened.
파일을 열어본 시간 또는 디렉토리에 cd명령으로 접근한 시간

-5 
서버에서 5일전에 변경된 파일

댓글목록

등록된 댓글이 없습니다.

1,139 (6/23P)

Search

Copyright © Cmd 명령어 3.17.148.66